package com.mondo.financialwallet.data;

import android.os.Handler;

import com.mondo.financialwallet.data.entity.BasisResponseEntity;
import com.mondo.financialwallet.data.entity.CheckMessageCodeResultEntity;
import com.mondo.financialwallet.data.entity.ClearProductDetailsEntity;
import com.mondo.financialwallet.data.entity.FeedbackResponseEntity;
import com.mondo.financialwallet.data.entity.FindEntity;
import com.mondo.financialwallet.data.entity.GoogleValidatorEntity;
import com.mondo.financialwallet.data.entity.HoldProductDetailsEntity;
import com.mondo.financialwallet.data.entity.HoldProductListEntity;
import com.mondo.financialwallet.data.entity.HoldProductProfitDataEntity;
import com.mondo.financialwallet.data.entity.MobilePrefixEntity;
import com.mondo.financialwallet.data.entity.MyTokenListEntity;
import com.mondo.financialwallet.data.entity.ProductDetailsEntity;
import com.mondo.financialwallet.data.entity.ProductListEntity;
import com.mondo.financialwallet.data.entity.ProductOrderListEntity;
import com.mondo.financialwallet.data.entity.SingleHoldProductProfitDataEntity;
import com.mondo.financialwallet.data.entity.TokenAddressEntity;
import com.mondo.financialwallet.data.entity.TokenTransactionRecordEntity;
import com.mondo.financialwallet.data.entity.UserAssetsEntity;
import com.mondo.financialwallet.data.entity.UserInfoEntity;
import com.mondo.financialwallet.data.entity.VersionUpdateEntity;
import com.mondo.financialwallet.data.entity.WalletAssetEntity;
import com.mondo.financialwallet.presentation.model.LoginUserInfoModel;
import com.mondo.financialwallet.data.params.FeedbackParams;
import com.mondo.financialwallet.data.params.LoginParams;
import com.mondo.financialwallet.data.params.RegisterParams;
import com.mondo.financialwallet.data.params.ResetPasswordParams;
import com.mondo.financialwallet.data.params.SendMessageParams;
import com.mondo.financialwallet.data.params.TokenTransferParams;

import java.io.File;

/**
 * 模拟远程数据，本地测试
 */
public class MockRemoteDataSource implements DataSource {

    @Override
    public void modifyAvatar(File avatar, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void versionUpdate(DataCallback<VersionUpdateEntity> callback) {

    }

    @Override
    public void customerFeedback(FeedbackParams params, DataCallback<FeedbackResponseEntity> callback) {

    }

    @Override
    public void holdProductList(DataCallback<HoldProductListEntity> callback) {

    }

    @Override
    public void holdProductDetails(String orderNumber, DataCallback<HoldProductDetailsEntity> callback) {

    }

    @Override
    public void clearProductDetails(String orderNumber, DataCallback<ClearProductDetailsEntity> callback) {

    }

    @Override
    public void holdProductProfitData(String orderNumber, DataCallback<HoldProductProfitDataEntity> callback) {
//        List<HoldProductProfitDataEntity.DataBean> dataBeans = Arrays.asList(
//                new HoldProductProfitDataEntity.DataBean("2019-03-01", "1.28"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-02", "1.29"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-03", "1.21"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-04", "1.22"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-05", "1.23"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-06", "1.24"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-07", "1.25"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-08", "2.26"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-09", "3.27"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-10", "4.38"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-11", "2.48"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-12", "2.44"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-13", "2.33"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-14", "2.22"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-15", "2.11"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-16", "2.12"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-17", "2.13"),
//                new HoldProductProfitDataEntity.DataBean("2019-03-18", "2.14")
//
//        );
//
//        List<List<HoldProductProfitDataEntity.DataBean>> data = new ArrayList<>();
//        data.add(dataBeans);
//        HoldProductProfitDataEntity result = new HoldProductProfitDataEntity(data);
//        result.setStatus("success");
//        callback.onResult(result);
    }

    @Override
    public void findDAppList(DataCallback<FindEntity> callback) {

    }

    @Override
    public void productOrderList(DataCallback<ProductOrderListEntity> callback) {

    }

    @Override
    public void googleValidator(DataCallback<GoogleValidatorEntity> callback) {

    }

    @Override
    public void bindGoogleValidator(String code, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void clearProduct(String orderNumber, String code, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void userInfo(DataCallback<UserInfoEntity> callback) {

    }

    @Override
    public void userAssets(DataCallback<UserAssetsEntity> callback) {

    }

    @Override
    public void myTokenList(DataCallback<MyTokenListEntity> callback) {

    }

    @Override
    public void login(
            LoginParams params, DataCallback<LoginUserInfoModel> callback) {
        callback.onResult(new LoginUserInfoModel("123"));
    }

    @Override
    public void register(
            RegisterParams params, DataCallback<BasisResponseEntity> callback) {
        postDelayed(() -> callback.onResult(BasisResponseEntity.success()));
    }

    @Override
    public void productDetails(String id, DataCallback<ProductDetailsEntity> callback) {

    }

    @Override
    public void sendMessageCode(
            SendMessageParams params, DataCallback<BasisResponseEntity> callback) {
        postDelayed(() -> callback.onResult(BasisResponseEntity.success()));
    }

    @Override
    public void transfer(TokenTransferParams params, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void tokenTransactionRecord(
            int page, String tokenId, String income, DataCallback<TokenTransactionRecordEntity> callback) {

    }

    @Override
    public void bindNewMobileNumber(String mobile, String code, String prefix, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void bindEmail(String email, String code, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void alterLoginPassword(String oldPassword, String newPassword, String code, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void singleHoldProductProfitData(String orderNumber, DataCallback<SingleHoldProductProfitDataEntity> callback) {

    }

    @Override
    public void productList(DataCallback<ProductListEntity> callback) {

    }

    @Override
    public void walletAsset(DataCallback<WalletAssetEntity> callback) {

    }

    @Override
    public void walletAssetAvailable(DataCallback<WalletAssetEntity> callback) {

    }

    @Override
    public void tokenAddress(String tokenId, DataCallback<TokenAddressEntity> callback) {

    }

    @Override
    public void sendMessageByUser(String mobileNumber, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void checkMessageCodeResult(String mobileNumber, String code, DataCallback<CheckMessageCodeResultEntity> callback) {

    }

    @Override
    public void alterPassword(ResetPasswordParams params, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void generateFinancingOrders(String goodsId, String amount, DataCallback<BasisResponseEntity> callback) {

    }

    @Override
    public void mobilePrefix(DataCallback<MobilePrefixEntity> callback) {

    }

    @Override
    public void alterNickname(String nickname, DataCallback<BasisResponseEntity> callback) {

    }


    private void postDelayed(Runnable runnable) {
        new Handler().postDelayed(runnable, 1000);
    }
}
